<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\CouponModel */

?>
<div class="coupon-model-view">
    <p>
        <?php if (\backend\components\MenuHelper::checkRoute('update')){ echo  Html::a('修改', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);}?>
        <?php if (\backend\components\MenuHelper::checkRoute('delete')){ echo  Html::a('删除', ['delete', 'id' => $model->id], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => '确定要删除此项?',
                'method' => 'post',
            ],
        ]) ;}?>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'id',
            'name',
            'amount',
            'denomination',
            'count',
            'create_time:datetime',
        ],
    ]) ?>

</div>
